package com.yelink.metrics.core.constant.enums;


import lombok.Getter;

/**
 * 字段类型
 * @author idea
 */
public enum FieldType {
    /**
     *
     */
    INT("int", 11, 0),
    DOUBLE("double", 11, 4),
    VARCHAR("varchar", 255, 0),
    DATETIME("datetime", 0, 0),
    DATE("date", 0, 0),

    AUTO(null, null, null),
    ;
    @Getter
    private final String type;
    /**
     * 默认长度
     */
    @Getter
    private final Integer defaultLength;
    /**
     * 默认小数点
     */
    @Getter
    private final Integer defaultPoint;


    FieldType(String type, Integer defaultLength, Integer defaultPoint) {
        this.type = type;
        this.defaultLength = defaultLength;
        this.defaultPoint = defaultPoint;
    }
}
